﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkBasket.Api;

namespace Workbasket.CoreExtensions.Controls
{
    [Export(typeof(IControl))]
    public class Group:IControl
    {

        static private Dictionary<string, string> _Properties = new Dictionary<string, string>();

        public Group()
        {
            _Properties.Add("Name","");
        }
        IDictionary<string, string> IControl.Properties
        {
            get
            {
                return _Properties;
            }
        }

        public string Description
        {
            get { return string.Empty; }
        }

        public string RenderBeginTag(IInstance InstanceData)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("<div class='panel panel-default'><div class='panel-heading'>" + InstanceData.Properties["Name"]);

             sb.Append("</div> <div class='panel-body'> <form class='form-horizontal' role='form'>  <div class='form-group'>");

             return sb.ToString();
                                   
                                    
                                       
        }
        public string RenderEndTag()
        {
            return "</div></form></div></div>";
        }
        public string ControlName
        {
            get { return "Group"; }
        }
        public string ToolBoxIcon
        {
            get { return "glyphicon glyphicon-list-alt"; }
        }
    }
}
